For Mac OS X hosts, VirtualBox ships in a disk image (dmg) file. Perform the following steps:
Double-click on that file to have its contents mounted.
A window will open telling you to double click on the
VirtualBox.mpkg
installer file
displayed in that window.
This will start the installer, which will allow you to select where to install VirtualBox to.
After installation, you can find a VirtualBox icon in the "Applications" folder in the Finder.
To uninstall VirtualBox, open the disk image (dmg) file again and double-click on the uninstall icon contained therein.
To perform a non-interactive installation of VirtualBox you can use the command line version of the installer application.
Mount the disk image (dmg) file as described in the normal installation. Then open a terminal session and execute:
sudo installer -pkg /Volumes/VirtualBox/VirtualBox.mpkg \ -target /Volumes/Macintosh\ HD